#-------------------------------------------------
#
# Project created by QtCreator 2024-12-19T13:03:37
#
#-------------------------------------------------

QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = pdfdemo
TEMPLATE = app
QT += concurrent
# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

CONFIG += c++20
CONFIG += static
# OCR

INCLUDEPATH += $$PWD/RapidOcrOnnx/include
include($$PWD/RapidOcrOnnx/RapidOcrOnnx.pri)

SOURCES += \
        imageutils.cpp \
        main.cpp \
        mainwindow.cpp
HEADERS += \
        imageutils.h \
        mainwindow.h

FORMS += \
        mainwindow.ui

INCLUDEPATH += libpoppler/include
INCLUDEPATH += libpoppler/include/poppler
INCLUDEPATH += libpoppler/include/poppler/cpp
INCLUDEPATH += libpoppler/include/poppler/qt5
INCLUDEPATH += utils

unix {
    LIBS += -L/home/guest/Desktop/workspace/pdf/work/pdfdemo/libpoppler/lib -lpoppler-cpp  -lpoppler-qt5
}

win32 {
    # 公共库
    LIBS += -L$$quote(C:\vcpkg\installed\x64-windows\lib) \
            -llibpng16 -ljpeg -ltiff -llcms2 
    #    -lturbojpeg #这个不需要
    LIBS += -lAdvapi32

    # Debug 模式
    CONFIG(debug, debug|release) {
        LIBS += -L$$quote(D:\workspace\work\poppler\build\Debug) -lpoppler
        LIBS += -L$$quote(D:\workspace\work\poppler\build\cpp\Debug) -lpoppler-cpp
        LIBS += -L$$quote(D:\workspace\work\poppler\build\extractpdf\Debug) -lpdfextract_lib
    }
    # Release 模式
    else {
        LIBS += -L$$quote(E:\workspace\work\poppler\build\Release) -lpoppler
        LIBS += -L$$quote(E:\workspace\work\poppler\build\cpp\Release) -lpoppler-cpp
        LIBS += -L$$quote(E:\workspace\work\poppler\build\extractpdf\Release) -lpdfextract_lib
    }
}

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

RESOURCES += \
    res.qrc
